home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr27 / gs26.zip / GS_STATD.PS < prev    next >
Text File  |  1993-04-28  |  7KB  |  184 lines

  1. %    Copyright (C) 1989-1993 Aladdin Enterprises.  All rights reserved.
  2. %    Distributed by Free Software Foundation, Inc.
  3. %
  4. % This file is part of Ghostscript.
  5. %
  6. % Ghostscript is distributed in the hope that it will be useful, but
  7. % WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. % to anyone for the consequences of using it or for whether it serves any
  9. % particular purpose or works at all, unless he says so in writing.  Refer
  10. % to the Ghostscript General Public License for full details.
  11. %
  12. % Everyone is granted permission to copy, modify and redistribute
  13. % Ghostscript, but only under the conditions described in the Ghostscript
  14. % General Public License.  A copy of this license is supposed to have been
  15. % given to you along with Ghostscript so you can know your rights and
  16. % responsibilities.  It should be in a file named COPYING.  Among other
  17. % things, the copyright notice and this notice must be preserved on all
  18. % copies.
  19.  
  20. % This file provides statusdict, serverdict, and assorted LaserWriter
  21. % operators, mostly for the benefit of poorly designed PostScript programs
  22. % that 'know' they are running on a LaserWriter.
  23.  
  24. systemdict begin
  25.  
  26.  /statusdict 80 dict def
  27.  /serverdict 4 dict def
  28.  
  29. % Define various paper formats.
  30. % Only letter, note, and legal are defined in the Adobe manual.
  31. % These procedures are also accessed as data structures during initialization,
  32. % so the page dimensions must be the first two elements of the procedure.
  33.  
  34.  /letter {612 792 //statusdict begin .setpagesize end} bind def
  35.  /note {540 720 //statusdict begin .setpagesize end} bind def
  36.  /legal {612 1008 //statusdict begin .setpagesize end} bind def
  37.  /a3 {842 1190 //statusdict begin .setpagesize end} bind def
  38.  /a4 {595 842 //statusdict begin .setpagesize end} bind def
  39.  /a5 {421 595 //statusdict begin .setpagesize end} bind def
  40.  /a6 {297 421 //statusdict begin .setpagesize end} bind def
  41.  /b4 {709 1002 //statusdict begin .setpagesize end} bind def
  42.  /flsa {612 936 //statusdict begin .setpagesize end} bind def  % U.S. foolscap
  43.  /flse {612 936 //statusdict begin .setpagesize end} bind def  % European foolscap
  44.  /halfletter {396 612 //statusdict begin .setpagesize end} bind def
  45.  /11x17 {792 1224 //statusdict begin .setpagesize end} bind def  % 11x17 portrait
  46.  /ledger {1224 792 //statusdict begin .setpagesize end} bind def  % 11x17 landscape
  47.  
  48. end
  49.  
  50. statusdict begin
  51.  
  52. % Define the pagetype values for the known page formats.
  53. % The values for all but letter and note are arbitrary.
  54. /.pagetypenames
  55.  { /letter /note /legal /a3 /a4 /a5 /a6 /b4
  56.    /flsa /flse /halfletter /11x17 /ledger
  57.  } cvlit readonly def
  58.  
  59. %%%%%% The following items were suggested by a user as useful.
  60.  
  61. % Permanent definitions
  62.  
  63. /ramsize         4194304 def
  64. /hardwareiomode        0 def
  65.     /sethardwareiomode     {pop} bind def
  66. /softwareiomode        0 def
  67.     /setsoftwareiomode     {pop} bind def
  68. /dosysstart        false def
  69.     /setdosysstart         {pop} bind def
  70. /allowjobreset      true def
  71.     /setallowjobreset      {pop} bind def
  72. /defaultpaperfamily    0 def
  73.     /setdefaultpaperfamily {pop} bind def
  74. /defaultpapertray      0 def
  75.     /setdefaultpapertray   {pop} bind def
  76. /defaulttrayswitch false def
  77.     /setdefaulttrayswitch  {pop} bind def
  78.  
  79. % Tray and format selection
  80.  
  81.  /11x17tray {} bind def
  82.  /a3tray {} bind def
  83.  /a4tray {} bind def
  84.  /a5tray {} bind def
  85.  /a6tray {} bind def
  86.  /b4tray {} bind def
  87.  /flsatray {} bind def
  88.  /flsetray {} bind def
  89.  /halflettertray {} bind def
  90.  /legaltray {} bind def
  91.  /lettertray {} bind def
  92.  
  93. % Per-job parameters
  94.  
  95. /paperfamily 0 def    % 0 is US, 1 is European
  96. /papertray 1 def
  97.     /setpapertray {statusdict exch /papertray exch put} bind def 
  98. /trayswitch false def    % paperout feeds from another tray
  99. /papersize {/letter true} bind def    % <name of paper size>, <short-edge-first-p>
  100. /appletalktype (LaserWriter) def
  101.  
  102. %%%%%% The following items are defined in the PostScript Language
  103. %%%%%% Reference Manual, First Edition.
  104.  
  105.  /checkpassword {statusdict begin .password eq end} bind def
  106.  /defaulttimeouts {statusdict begin .timeouts aload pop end} bind def
  107. %/dostartpage
  108.  /eescratch {pop 0} bind def
  109.  /idlefonts {statusdict begin mark .idlefonts aload pop end} bind def
  110.  /jobname () def
  111. %/jobtimeout
  112.  /manualfeed false def
  113.  /manualfeedtimeout 60 def
  114.  /margins {statusdict begin .topmargin .leftmargin end} bind def
  115.  /pagecount {4711} bind def
  116.  /pagestackorder {false} bind def
  117. %/pagetype
  118.  /prefeed false def
  119.  /printererror {pop pop} bind def
  120.  /printername {statusdict begin .printername exch copy end} bind def
  121.  /processcolors /processcolors load def        % defined in systemdict
  122.  /product product def        % product is defined in systemdict
  123.  /revision revision def        % revision is defined in systemdict
  124.  /sccbatch {pop 9600 0} bind def
  125.  /sccinteractive {pop 9600 0} bind def
  126.  /setdefaulttimeouts {statusdict begin .timeouts astore pop end} bind def
  127.  /setdostartpage {statusdict exch /dostartpage exch put} bind def
  128.  /setduplexmode {pop} bind def
  129.  /seteescratch {pop pop} bind def
  130.  /setidlefonts {] statusdict exch /.idlefonts exch put} bind def
  131.  /setjobtimeout {statusdict exch /jobtimeout exch put} bind def
  132.  /setmargins
  133.   {statusdict begin /.leftmargin exch def /.topmargin exch def end} bind def
  134.  /setpagetype
  135.   { statusdict begin
  136.       dup .pagetypenames exch get systemdict exch get exec
  137.       /pagetype exch def
  138.     end
  139.   } bind def
  140.  /setpassword
  141.   {exch checkpassword
  142.     {statusdict exch /.password exch put true}
  143.     {pop false}
  144.    ifelse} bind def
  145.  /setprintername
  146.   {dup length string copy statusdict exch /printername exch put} bind def
  147.  /setsccbatch {pop pop pop} bind def
  148.  /setsccinteractive {pop pop pop} bind def
  149.  /waittimeout 300 def
  150.  
  151. /.setpagesize
  152.  { mark /HWSize [
  153.      4 index 4 index matrix defaultmatrix dtransform
  154.      abs ceiling cvi exch abs ceiling cvi exch
  155.    ] currentdevice putdeviceprops pop pop pop
  156.    initmatrix initclip erasepage
  157.  } bind def
  158. /.password 0 def
  159. /.timeouts [0 60 30] def
  160. true setdostartpage
  161. mark setidlefonts
  162. 0 setjobtimeout
  163. 0 0 setmargins
  164. 0 setpagetype
  165. product setprintername
  166.  
  167. end    % statusdict
  168.  
  169. % The following contents of serverdict are a complete guess,
  170. % based on some observed LaserWriter boilerplate.
  171.  
  172. serverdict begin
  173.  
  174.  /execjob { } bind def
  175. % The Red Book implies that something like the following is
  176. % an appropriate definition of exitserver.
  177.  /exitserver { clear stop } bind def
  178. % However, this interacts badly with our standard error handler,
  179. % so we override it with the following less appropriate definition.
  180.  /exitserver { clear cleardictstack } bind def
  181.  /setrealdevice { } bind def
  182.  
  183. end    % serverdict
  184.